package cn.study.luckyinfrastructure.gateway.iml.mapper;

import cn.study.luckyinfrastructure.gateway.iml.dataObject.PrizeDB;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

@Mapper
public interface PrizeMapper extends BaseMapper<PrizeDB> {
    @Update("update bld_prize  set inventory=inventory-#{number} where id=#{id} and inventory-#{number}>=0")
    int dedutionInventory(@Param("id") Long prizeId,@Param("number") Integer number);
}
